<template>
	<view class="homebox">
		<!-- 		<view class="czname">
			测站信息
		</view> -->
		<view class="czinput">
			<view class="lebox">
				名称：
			</view>
			<view class="leboxinput">
				<view class="">
					{{cezhanitem.name}}
				</view>
			</view>
		</view>
		<view class="czinput">
			<view class="lebox">
				编码：
			</view>
			<view class="">
				<view class="">
					{{cezhanitem.nub}}
				</view>
			</view>
		</view>
		<view class="hetop">
			<view class="titleclass">
				测段参数
			</view>
		</view>
		<view class="czinput">
			<view class="lebox">
				断面形状：
			</view>
			<view class="">
				<uni-data-checkbox v-model="cezhanitem.xingzhuang" :localdata="range"></uni-data-checkbox>
			</view>
		</view>
		<view class="czinput">
			<view class="lebox">
				渠底宽度：
			</view>
			<view class="">
				<view class="">
					{{cezhanitem.qudikuandu}}
				</view>
			</view>
		</view>
		<view class="czinput">
			<view class="lebox">
				设计水深：
			</view>
			<view class="">
				<view class="">
					{{cezhanitem.shejishuishen}}
				</view>
			</view>
		</view>
		<view class="hetop">
			<view class="titleclass">
				标准测法
			</view>
		</view>
		<view class="czinput">
			<view class="lebox">
				测线条数：
			</view>
			<view class="">
				{{cezhanitem.cexiantiaoshu}}
			</view>
		</view>
		<view class="czinput">
			<view class="lebox">
				测线布置：
			</view>
			<view class="">
				<uni-data-checkbox v-model="cezhanitem.cexianbuzhi" :localdata="range2"></uni-data-checkbox>
			</view>
		</view>
		<view class="czinput">
			<view class="lebox">
				默认测法：
			</view>
			<view class="">
				<uni-data-checkbox v-model="cezhanitem.morencefa" :localdata="range3"></uni-data-checkbox>
			</view>
		</view>
		<view class="" style="height: 100rpx;margin-top: 50rpx;">
			<u-button @click="next" type="primary" shape="circle" text="下一步"></u-button>
		</view>
		<view class="" style="height: 100rpx;">
		
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cezhanitem: {
					id: null,
					name: "测站名称",
					nub: 'zlpzxcd',
					lot: '114.472177',
					lat: '38.10324',
					xingzhuang: 0,
					qudikuandu: '15.000',
					shejishuishen: '4.5',
					shejiliuliang: '100',
					shangxianshuishen: '4',
					xiaxianshuishen: '1',
					qudizongpo: '5',
					qupocaolv: '3',
					lSA: '27.000',
					rSA: '27.000',
					cexiantiaoshu: 0,
					cexianbuzhi: 1,
					morencefa: 1,
					kL: '0.95',
					kR: '0.95',
					zijishuishenxiuzheng: '0',
					cexianlist: [],
					qk: '1',
					shuiliangxishu: '1',
					vmL: '1',
					vmR: '1'
				},
				cezhanlist: [],
				range: [{
					text: '梯形',
					value: 0,
					disable:true
				}, {
					text: '矩形',
					value: 1,
					disable:true
				}, ],
				range1: [{
						text: '1条测线',
						value: 1
					},
					{
						text: '2条测线',
						value: 2
					},
					{
						text: '3条测线',
						value: 3
					},
					{
						text: '4条测线',
						value: 4
					},
					{
						text: '5条测线',
						value: 5
					},
					{
						text: '6条测线',
						value: 6
					},
					{
						text: '7条测线',
						value: 7
					},
					{
						text: '8条测线',
						value: 8
					},
					{
						text: '9条测线',
						value: 9
					},
				],
				range2: [{
						text: '均匀',
						value: 1,
						disable:true
					},
					{
						text: '不均匀',
						value: 2,
						disable:true
					}
				],
				range3: [{
						text: '一点法',
						value: 1,
						disable:true
					},
					{
						text: '三点法',
						value: 3,
						disable:true
					}
				],
				cezhanId: null
			}
		},
		onLoad(option) {
			this.cezhanId = option.id
			this.cezhanlist = this.vuex_saveCezhandata
		},
		onShow() {
			// 清空计算点流速
			uni.$u.vuex('vuex_cexian', [])
			let cezhanArr = this.cezhanlist
			let cezhanObj = {}
			for(let i in cezhanArr){
				if(cezhanArr[i].id == this.cezhanId){
					cezhanObj = cezhanArr[i]
				}
			}
			this.cezhanitem = cezhanObj
			uni.$u.vuex('vuex_cezhanInfo', cezhanObj)
		},
		methods: {
			next(){
				uni.$u.vuex('vuex_cezhanItemId', this.cezhanitem.id)
				uni.redirectTo({
					url: '/pagesA/aproductA/automaticCal?&cexians=' + this.cezhanitem.cexiantiaoshu + '&dianfa=' + this.cezhanitem.morencefa
				});
			}
		}
	}
</script>
<style scoped lang="scss">
	.titleclass {
		color: #4a659f;
	}
	.hetop {
		text-align: center;
		line-height: 60rpx;
		background-color: #e8f2fd;
		border-radius: 30rpx;
		font-size: 30rpx;
		font-weight: bold;
	}

	.homebox {
		width: 690rpx;
		padding: 0 30rpx;

		// background-color: #464ebf;
		.czname {
			display: flex;
			justify-content: center;
			line-height: 100rpx;
			font-size: 40rpx;
		}

		.czinput {
			font-size: 35rpx;
			padding: 20rpx 20rpx;
			display: flex;
			align-items: center;
			// background-color: #ffffff;
			border-bottom: 1rpx solid #e3e3e3;
			border-radius: 0rpx;
			margin-bottom: 20rpx;

			.lebox {
				width: 180rpx;
				text-align: justify;
				text-align-last: justify;
			}
		}

		.qicebox {
			display: flex;
			justify-content: center;
			align-items: center;

			.qicedian {
				width: 200rpx;
				height: 100rpx;
				line-height: 100rpx;
				text-align: center;
				// padding: 20rpx 40rpx;
				color: #484746;
				border: #dddcda solid 1rpx;
				background-color: #fafafa;
			}

			.qicinput {
				width: 160rpx;
				height: 100rpx;
				padding: 0 20rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				line-height: 100rpx;
				color: #7e7d7a;
				border: #dddcda solid 1rpx;
				background-color: #ffffff;
			}
		}
	}
</style>
<style>
	page {
		/* background-color: #eaeaea; */
	}
</style>